<template>
  <div class="app-container">
    <el-form :inline="true">
      <el-form-item label="单位负责人">
        <el-input size="mini" type="text" v-model="personCharge"></el-input>
      </el-form-item>
      <el-form-item label="统计负责人">
        <el-input size="mini" type="text" v-model="personStatistic"></el-input>
      </el-form-item>
      <el-form-item label="填报人">
        <el-input size="mini" type="text" v-model="personReport"></el-input>
      </el-form-item>
      <el-form-item label="填报日期">
        <el-input size="mini" type="text" v-model="time"></el-input>
      </el-form-item>
      <el-form-item label="">
        <el-button size="mini" type="primary" @click="getTableData"
          >新增</el-button
        >
        <el-button size="mini" @click="getTableData">保存</el-button>
        <el-button size="mini" @click="getTableData">编辑</el-button>
      </el-form-item>
    </el-form>

    <com :goods="goods" :totalGoods="totalGoods"></com>
    <com :goods="box" :totalGoods="totalBox" :tableHead="false"></com>
    <com :goods="ship" :totalGoods="totalShip" :tableHead="false"></com>

    <el-dialog></el-dialog>
  </div>
</template>

<script>
import tbData from './data'
import com from './com.vue'
export default {
  components: { com },
  data () {
    return {
      goods: null,
      totalGoods: null,
      box: null,
      totalBox: null,
      ship: null,
      totalShip: null,
      personCharge: '', // 单位负责人
      personStatistic: '', // 统计负责人
      personReport: '', // 填报人
      time: ''
    }
  },
  created () {
    this.goods = tbData.goods
    this.totalGoods = tbData.totalGoods
    this.box = tbData.box
    this.totalBox = tbData.totalBox
    this.ship = tbData.ship
    this.totalShip = tbData.totalShip
    this.personCharge = tbData.personCharge
    this.personStatistic = tbData.personStatistic
    this.personReport = tbData.personReport
    this.time = tbData.time
    console.log(this.goods)
  },
  methods: {
    getTableData () {
      console.log({
        goods: this.goods,
        totalGoods: this.totalGoods,
        box: this.box,
        totalBox: this.totalBox,
        ship: this.ship,
        totalShip: this.totalShip
      })
    }
  }
}
</script>

<style scoped lang="scss">
// ::v-deep .el-textarea__inner {
//   border: none;
//   // resize: none;
//   padding: 0;
// }
// ::v-deep .el-input__inner {
//   border: none;
//   padding: 0;
// }

// ::v-deep .el-table__cell {
//   padding: 0;
// }

// ::v-deep .cell {
//   padding-left: 0;
//   padding-right: 0;
// }

// ::v-deep .el-table--border .el-table__cell:first-child .cell {
//   padding-left: 0;
// }
</style>
